﻿using System.Globalization;
using System.Windows.Data;

namespace YunxSoft.AfterSchoolClazz.Converters
{
    public class EnumToBooleanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (parameter is null || value is null) return false;
            return value.Equals(parameter);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (bool)value ? parameter : Binding.DoNothing;
        }
    }

    public enum ExportType
    {
        BySchedule,
        ByTeacher
    }
}
